<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "me_user_pay_record".
 *
 * @property integer $id
 * @property integer $userid
 * @property integer $type
 * @property integer $class_type
 * @property double $amount
 * @property string $description
 * @property integer $created_at
 * @property integer $updated_at
 */
class UserPayRecord extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'me_user_pay_record';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['userid', 'type'], 'required'],
            [['userid', 'type', 'class_type', 'created_at', 'updated_at'], 'integer'],
            [['amount'], 'number'],
            [['description'], 'string', 'max' => 255],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => '自增ID',
            'userid' => '用户编号',
            'type' => '交易类型',
            'class_type' => '类别',
            'amount' => '金额',
            'description' => '描述',
            'created_at' => '创建时间',
            'updated_at' => '更新时间',
        ];
    }
}
